package com.fit.piris.pages.fanpage;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.piris.dao.fanpage.FanPageDAO;
import com.fit.piris.entities.fanpage.FanPage;

public class View {

	@Property
	@Persist
	private FanPage fanPage;
	
	@Inject
	private FanPageDAO fanPageDAO;
	
	Object onActivate(Long id){
		if (id==null) {
			return Browse.class;
		}
		fanPage = fanPageDAO.findByID(id);
		return null;
	}
	
}
